#!/bin/bash

# Script to split subsections from section_3.2.tex into separate files

INPUT_FILE="section_3.2.tex"

# Extract 重要抽样法 (lines 320-700)
sed -n '320,700p' "$INPUT_FILE" > subsection_importance_sampling.tex

# Extract 分层抽样法 (lines 701 to end of file)
sed -n '701,$p' "$INPUT_FILE" > subsection_stratified_sampling.tex

echo "Successfully split subsections:"
echo "  - subsection_importance_sampling.tex (lines 320-700)"
echo "  - subsection_stratified_sampling.tex (lines 701-end)"
